﻿using System.Windows.Forms;
using Me.Amon.POS.M;
using Me.Amon.Util;

namespace Me.Amon.POS.V.SO
{
    public partial class UcPay : UserControl
    {
        public UcPay()
        {
            InitializeComponent();
        }

        public void ShowPay()
        {
            LdItem.Text = "0";
            LdUnit.Text = "0";
            LdSpuPrice.Text = "0.00";
            LdVipPrice.Text = "0.00";
            LdProPrice.Text = "0.00";
        }

        public void ShowPay(int pay)
        {
            LdProPrice.Text = CharUtil.FormatPrice(pay);
        }

        public void ShowPay(MSoHeader header, MSoDetail detail)
        {
            LdItem.Text = header.item_qty.ToString();
            LdUnit.Text = header.unit_qty.ToString();
            LdSpuPrice.Text = CharUtil.FormatPrice(detail.spu_price);
            LdVipPrice.Text = CharUtil.FormatPrice(detail.vip_price);
            LdProPrice.Text = CharUtil.FormatPrice(detail.pro_price);
        }
    }
}
